CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)

if(${UNIX})
	option(USE_LLVM "USE CLANG" ON)
	add_definitions("-g")

	if(USE_LLVM)
		SET(CMAKE_C_COMPILER clang)
		SET(CMAKE_CXX_COMPILER clang++)
	else(USE_LLVM)
		SET(CMAKE_C_COMPILER gcc)
		SET(CMAKE_CXX_COMPILER g++)
	endif(USE_LLVM)
	SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=c++11)
endif(${UNIX})

if(${UNIX})
SET(EXECUTABLE_OUTPUT_PATH	${CMAKE_CURRENT_SOURCE_DIR}/bin/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE})
SET(LIBRARY_OUTPUT_PATH 	${CMAKE_CURRENT_SOURCE_DIR}/lib/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE})
else(${UNIX})
SET(EXECUTABLE_OUTPUT_PATH	${CMAKE_CURRENT_SOURCE_DIR}/bin/${CMAKE_SYSTEM_NAME})
SET(LIBRARY_OUTPUT_PATH 	${CMAKE_CURRENT_SOURCE_DIR}/lib/${CMAKE_SYSTEM_NAME})
endif(${UNIX})


SET(EXECUTABLE_REAL_OUTPUT_PATH	${CMAKE_CURRENT_SOURCE_DIR}/bin/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE})
SET(LIBRARY_REAL_OUTPUT_PATH	${CMAKE_CURRENT_SOURCE_DIR}/lib/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE})

message("Sytem: " ${CMAKE_SYSTEM})
message("System Name: " ${CMAKE_SYSTEM_NAME})
message("Processor: " ${CMAKE_SYSTEM_PROCESSOR})
message("C COMPILER :" ${CMAKE_C_COMPILER})
message("C++ COMPILER :" ${CMAKE_CXX_COMPILER})

message("bin :"  ${EXECUTABLE_OUTPUT_PATH})
message("lib :"  ${LIBRARY_OUTPUT_PATH})

SET(INCLUDE_DIR		${CMAKE_CURRENT_SOURCE_DIR}/include)
SET(SRC_DIR			${CMAKE_CURRENT_SOURCE_DIR}/src)

if(${UNIX})
SET(FELOWRIA_LIB 				libFelowria.so)
else(${UNIX})
SET(FELOWRIA_LIB 				libFelowria.lib)
endif(${UNIX})

add_subdirectory(src)
add_subdirectory(Test)
